// ~ Package Declaration
// ==================================================

package com.wms.web.action.system;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ExceptionMapping;
import org.apache.struts2.convention.annotation.ExceptionMappings;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;

import com.wms.data.domain.service.SystemUserService;
import com.wms.web.action.AbstractAction;

//~ Comments
//==================================================

/**
 * main page Action.
 * 
 * <table border="1" width="80%">
 * <tr>
 * <th>Version</th>
 * <th>Date</th>
 * <th>Role</th>
 * <th>Modified By</th>
 * <th>Details</th>
 * </tr>
 * <tr>
 * <td>%I%</td>
 * <td>2011/11/18</td>
 * <td>SD/PG</td>
 * <td>Evan</td>
 * <td>Created By</td>
 * </tr>
 * </table>
 * <p/>
 * 
 * <pre>
 *	PSTS Pooling Action.
 * </pre>
 *
 * @author Evan
 * @version 1.0
 * @since 1.5
 * 
 * SVN:
 * <ol>
 * 	<li>$Id$</li>
 * 	<li>$Rev$</li>
 * </ol>
 *
 */
@ParentPackage("wms")
@Namespace("/app")
//@Result(name="exception", location="/WEB-INF/jsp/common/error.jsp")
//@ExceptionMappings(@ExceptionMapping(exception="java.lang.Exception", result="exception"))
public class MainAction extends AbstractAction {

	//~ Static Fields
	// ==================================================
	
	private static final long serialVersionUID = 1L;
	
	// ~ Fields
	// ==================================================
	
	@Autowired
	private SystemUserService systemUserService;
	
	private String userName;
	
	private String password;
	
	private boolean adLogin;
	
	//~ Constructors
	// ==================================================

	// ~ Methods
	// ==================================================
	
	/**
	 * init Login.
	 *
	 * <pre>
	 * 	init Login
	 * </pre>
	 *
	 * @return String
	 */
	@Action(value="top", results={@Result(name="success", location="/WEB-INF/jsp/system/main/top.jsp")})
	public String initTop() {
		
		return SUCCESS;
	}
	
	/**
	 * init Login.
	 *
	 * <pre>
	 * 	init Login
	 * </pre>
	 *
	 * @return String
	 */
	@Action(value="left", results={@Result(name="success", location="/WEB-INF/jsp/system/main/menu.jsp")})
	public String initMenu() {
		
		return SUCCESS;
	}
	
	/**
	 * init Login.
	 *
	 * <pre>
	 * 	init Login
	 * </pre>
	 *
	 * @return String
	 */
	@Action(value="welcome", results={@Result(name="success", location="/WEB-INF/jsp/system/main/welcome.jsp")})
	public String initWelcome() {
		
		return SUCCESS;
	}
}